package com.josework.springhelloworld.dto;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.List;

@Data
public class PageInfo {

    public int pageSize;

    public int pageIndex;

    public String orderBy;

    public List<String> orderList() {
        if(!StringUtils.isEmpty(orderBy)){
            return Arrays.asList(orderBy.split(","));
        }else {
            return null;
        }

    }

}
